<html>
<HEAD>
<META http-equiv=content-type content="text/html; charset=utf-8">
</HEAD>
<body >
<br><br><br><br><br>
<center><h2>список пользователей</h2></center>
<table align="center"border=1>
<tr align="center">
<td>логин</td>
<td>емаил</td>
</tr>
<a href="/spisok.php?page=1">1</a>
<?php
include "vhod.php";
	$db = new DB();   
	//$data=$db->findALL('user') ;
	$a=$db->sel('user');
	$total_rows=$a[0][0];
	$per_page=5;
	$num_pages=ceil($total_rows/$per_page);
	$page = isset($_GET['page']) ? $_GET[page] : 0;
	$start=abs($page*$per_page);
	$res=$db->sel_limit('user',$start,$per_page);
	foreach($res as $obj)
	{
			
	  		print "<tr align=\"center\"><td>{$obj['login']}</td>";
			print "<td>{$obj['email']}</td>";
	}
	
?>
</table>
</body>
</html>
